This command performs file name globbing in a fashion similar to the csh shell. It returns a list of the files whose names match any of the pattern arguments.
If the initial arguments to glob start with - then they are treated as switches. The following switches are currently supported:
The pattern arguments may contain any of the following special characters:
As with csh, a .
at the beginning of a file's name or
just after a /
must be matched explicitly or with a {}
construct. In addition, all /
characters must be matched
explicitly.
If the first character in a pattern is ~
then it refers to the home directory for the user whose name follows
the ~
. If the ~
is followed immediately by
/
then the value of the HOME
environment
variable is used.
The glob command differs from csh globbing in two ways. First, it does not sort its result list (use the lsort command if you want the list sorted).
Second, glob only returns the names of files that actually exist; in csh no check for existence is made unless a pattern contains a ?, *, or [] construct.